package it.ictdays12.cipcip;

import java.util.Comparator;

public class TagCounterComparator implements Comparator {

	public int compare(Object lhs, Object rhs) {
		
		TagCounter tc1 = (TagCounter)lhs;
		TagCounter tc2 = (TagCounter)rhs;
		
		if (tc1.getTimeElapsed() < tc2.getTimeElapsed())
			return 1;
		else if (tc1.getTimeElapsed() > tc2.getTimeElapsed())
			return -1;
		else 
			return 0;
	}
}